<%@include file="_webconfig.jsp"%>
<jsp:useBean id="temp"      class="myPack.Template"  scope="session">
    <jsp:setProperty name="temp" property="tempDir"  value="<%=cnfTempDir%>" />
    <jsp:setProperty name="temp" property="publDir"  value="<%=cnfPublDir%>" />
</jsp:useBean>
<jsp:useBean id="cart"      class="myPack.Cart"       scope="session"/>
<jsp:useBean id="category"  class="myPack.Category"   scope="session"/>
<jsp:useBean id="shopitem"  class="myPack.ShopItem"   scope="session"/>
<jsp:useBean id="customer"  class="myPack.Customer"   scope="session"/>
<%

  ////////////////////////////////////
  //                                //
  //   _core.jsp                    //
  //   Develope by PHUONG [07T2]    //
  //   boingonline@gmail.com        //
  //   public by www.blog.kai.vn    //
  //                                //
  ////////////////////////////////////

  // Cac khoi cua trang
  String leftBlock="", rightBlock="", mainBlock="", menu="";

  //userID = -1: Chua dang nhap, #-1: Da dang nhap voi ma dang nhap tren
  int userID=-1;

  //--KIEM TRA USER
  if(session.getAttribute("userID")!=null) {
	  userID = Integer.parseInt(session.getAttribute("userID").toString());
  }

  //--PAGE STATUS
  int pageCounter = ((Integer)application.getAttribute("pageCounter")).intValue();
  pageCounter += 1;
  application.setAttribute("pageCounter", pageCounter);
  
  String currentURL = request.getRequestURL().toString();
  if(request.getQueryString()!=null) {
	  currentURL=currentURL+"?"+request.getQueryString();
  }
  int visitCounter = ((Integer)application.getAttribute("visitCounter")).intValue() + 1;
  if(session.getAttribute("currentURL")==null) {
	  session.setAttribute("currentURL", currentURL);
	  application.setAttribute("visitCounter", visitCounter);
  }
  String pageStatus = "<div class=status-page>L&#432;&#7907;t xem trang: " + pageCounter + "<BR>" + "L&#432;&#7907;t truy c&#7853;p: " + visitCounter+ "</div>";

 //-------------------------------------------------------------------------------------
 //Phan MAIN_PAGE trong layout duoc tao boi include o day

 //-------------------------------------------------------------------------------------
 //Ket thuc tat ca cac ung dung, xuat ket qua html ve phia client bang cach su dung  lop
 //Template de lay teplate roi gan cac ket qua da duoc xu ly vao trang

%>

